package com.financing.platform.dao.impl;


import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IWxShopInfoDao;
import com.financing.platform.dto.WxShopInfoDTO;
import com.financing.platform.util.SqlName;
/**
 * wx_shop_info  
 * 店铺信息表 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("wxShopInfoDao")
public class WxShopInfoDaoImpl extends BaseDaoImpl implements IWxShopInfoDao {


	@Override
	public int insert(WxShopInfoDTO wxShopInfo) throws SQLException {
		return (Integer) this.sqlMapClient.insert(SqlName.WxShopInfoSql.insert, wxShopInfo);
	}

	@Override
	public void update(WxShopInfoDTO wxShopInfo) throws SQLException {
		this.sqlMapClient.update(SqlName.WxShopInfoSql.update, wxShopInfo);
	}

	@Override
	public void updateForce(WxShopInfoDTO wxShopInfo) throws SQLException {
		this.sqlMapClient.update(SqlName.WxShopInfoSql.updateForce, wxShopInfo);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClient.delete(SqlName.WxShopInfoSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<WxShopInfoDTO> queryList(WxShopInfoDTO wxShopInfo) throws SQLException {
		return this.sqlMapClient.queryForList(SqlName.WxShopInfoSql.queryList, wxShopInfo);
	}

	@Override
	public int queryListCount(WxShopInfoDTO wxShopInfo) throws SQLException {
		return (Integer) this.sqlMapClient.queryForObject(SqlName.WxShopInfoSql.queryListCount, wxShopInfo);
	}

	@Override
	public WxShopInfoDTO loadById(Integer id) throws SQLException {
		return  (WxShopInfoDTO)this.sqlMapClient.queryForObject(SqlName.WxShopInfoSql.loadById,id);
	}

 	
}
